import java.util.Random;
import java.util.Scanner;

public class test {
    public static void main3 (String[] args) {
        Random random = new Random();
        int randNum = random.nextInt(100);
        Scanner scan = new Scanner(System.in);
        System.out.println("输入一个数字：");
        while(true){
            int guess = scan.nextInt();
            if(guess < randNum) {
                System.out.println("猜小了");
            } else if (guess > randNum) {
                System.out.println("猜大了");
            } else {
                System.out.println("猜对了");
                break;
            }
        }
    }


    public static void main2(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("输入一个年龄：");
        int age=sc.nextInt();
        System.out.println(age);
        sc.nextLine();  //sc.nextLine()自动读入输入年龄后接受的回车，若不加该语句则“姓名”无法接收变量
        System.out.println("输入姓名：");
        String name = sc.nextLine();    //next读至空格结束，nextLine读入一整行
        System.out.println(name);
        System.out.println("输入工资：");
        double price=sc.nextDouble();
        System.out.println(price);

        //循环输入多组数据
        while(sc.hasNext()){    //在控制台通过ctrl+d结束
            int n=sc.nextInt();
            System.out.println(n);
        }
    }


    public static void main1(String[] args) {
        String s=10+20+"ds";    //30ds
        String n="ds"+10+20;    //ds1020
        System.out.println(s);
        System.out.println(n);
        String str1="10009";
        int ret=Integer.parseInt(str1);
        System.out.println(ret+1);  //100010
        System.out.println(Integer.valueOf(str1));  //10009
        int a=10;
        //System.out.println(!a);//err
        int score=90;
        if(score>80)
            System.out.println("good");
        //判断闰年
        for(int i=1000;i<2000;i++){
           if(i%100==0){
               if(i%400==0)
                   System.out.println(i);
           } else if(i%4==0)
               System.out.println(i);
        }
        int i=100;
        while(i<=200){
            if(i%12!=0){
                i++;
                continue;
            }
            System.out.println(i);
            i++;
        }
    }
}
